Skip to content

feat(pwa): harden install/update flow and offline strategy - #559

Merged
MaryammAli merged 1 commit into
BlockDash-Studios:mainfrom
ReinaMaze:feat/pwa-hardening-install-update-offline
Aug 21, 2026
Merged

feat(pwa): harden install/update flow and offline strategy#559
MaryammAli merged 1 commit into
BlockDash-Studios:mainfrom
ReinaMaze:feat/pwa-hardening-install-update-offline

Conversation

@ReinaMaze

Copy link
Copy Markdown
Contributor

feat(pwa): Harden install/update flow and offline strategy

Safe refresh timing and reliable caching with clear online/offline state transitions.

Changes

  • Cache size limits (50MB) with LRU eviction policy in service worker
  • Update detection on app focus/visibility change (plus 60s polling)
  • Real connectivity heartbeat checks every 30s using HEAD requests
  • Offline error queue using IndexedDB with auto-retry on reconnect
  • Error sync hook for automatic retry when connection restored
  • Fixed provider nesting - moved OnlineStatusProvider outside ErrorReportingShell
  • Improved offline page UX with race condition fixes and session storage
  • Enhanced PWA manifest with better description and screenshot handling
  • Comprehensive PWA documentation covering all features and testing

Acceptance Criteria

  • Installation and update prompts appear only in eligible contexts
  • Dismissal without breaking navigation
  • Offline fallback pages shown gracefully when cached routes unavailable
  • Cache/versioning strategy documented and aligned with deployment behavior

Testing

  • Verified build compilation with no errors
  • All 18 static pages generated successfully
  • Type checking passed
  • Tested offline error queueing and reconnection retry logic
  • Service worker update detection verified on focus/visibility change

close #527

- Add cache size limits (50MB) with LRU eviction policy
- Implement update detection on app focus/visibility change
- Add real connectivity heartbeat checks (every 30s)
- Implement offline error queue using IndexedDB
- Auto-retry queued errors when online
- Fix provider nesting (OnlineStatusProvider before ErrorReportingShell)
- Improve offline page UX with redirect race condition fixes
- Preserve user intent by storing intended URL in sessionStorage
- Update manifest description and improve screenshot handling
- Add comprehensive PWA documentation to README

Fixes:
- Safe install prompts with proper dependency array
- Update banner shows after reconnection
- No data loss for errors during offline periods
- Better offline state management with connectivity verification

@MaryammAli MaryammAli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
a job well done dev

@MaryammAli
MaryammAli merged commit 26df28c into BlockDash-Studios:main Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve PWA install lifecycle and offline fallback behavior

2 participants